changed return and redirection of auth