using variable names that make sense.
Setting user_id in session.
Fixing sad indentation.