Fix account registration and login