Implement user login handler.

Until now a user's password hasn't been checked for login. This patch
implements the login functionality including checking a username and
password, and a testcase for it.

Now implementing the testcase...