Correcting the login url in ajax call