added return to referrer page for auth plugin