authorization and grab last intented url redirection