fix login and register