Adding real session management to the login controller
Adding session recovery middleware