Added login method.