fixed null pointer exception in getLoginStatus

added a check for a valid session to getLoginStatus since. When there was no session it threw a null pointer exception.