isAuthenticated(); if (!$is_authenticated) { echo 'Login with pnut'; } else { $u = $api->getAuthorizedUser(); echo 'Welcome @'.$u->username; }