I have a login and a register conected to an api, that api return the same in both cases, it return the user and the user token, so when the user register there is redirecte