Implemented ajax login