Prevent login redirection to foreign domain