fixing user registration and log-in