solve promise issue with user and login