updated version with persistent login for 1 hour