go to login in case of rejected promise