Use session and cookie to remember if user is logged in.