keep user logged in when application closes