Revised login neater and using AJAX