Fixed erro var name and added timer to redirect after login.