added token isexpired test. fixed issue with portal token generation url