fix user authentication after registering