This method is useful to determine whether the user is currently logged in. It will return true if the user is logged in or else return false if the user is not logged in or if the session has timed out.
Usage:
gs.isLoggedIn(); //return true if the user is logged in
Example:
if ( gs.isLoggedIn() ) { //some code }