Implemented frontend AJAX login