Implemented userinfo and login functions.