Fatal error occurred: No referer found to redirect to when authenticated (500)