Added function for getting user information based on credentials.