added redirect url and message in check_credentials