Autamatically login when the sidebar is closed

If the browser starts and the sidebar is closed, still logs in the user if the
cookie is not expired.