fix registration and login