added ability get token from android client apps
refactoring code