Implemented user login persistence with session and logout as well.
New redirect_to function was implemented and used.