added canLogin() to userinfo class