Fixed issue in login/signup going to main too early

before the rest call was made