Session is now properly managed for logging in a user