check for user logged in functional
check for user logged in working