When you log in from cookie, make the session valid for login as well. Not sure what...