fixed registration and login