validating sessionid and displaying UI accordingly