Added support to get token from user credentials