fix login and registration