changes to structure
working authentication and getCredentials method