Fix login and register