Added user login method and code.