Adds client-side ajax request for login and success/failure alert boxes