ISAACLOUD-303 Added refreh method for token generation, fixed exception
handling.