Implemented user login

Now, the users are able to login via an ajax call to the system.