Merge pull request #33 from anilsaldhana/master

see comments
Refactored method to retrieve current Credential entity. Fixed the query to the credential attributes.
Updated test suites.