if user is not None:
auth.login(request, user)
name = user.first_name or user.username
message = "Login succeeded. Welcome, %s." % name
if user is not None:
auth.login(request, user)
name = user.first_name or user.username
message = "Login succeeded. Welcome, %s." % name