Completing the login forms with error handling (ajax form)