Fixed registration and login