Fixing bug in user.isLoggedIn(). Making helper methods public for user object