Implemented AJAX version of sign-in