final version of user authentication, including cookies, persistency, and leaving the site