Add more functionality to get bearer token (not complete yet though)