def authenticate(username, password)
      begin
        options = {authorization: basic_auth_encryption(username, password)}
        url = url_for_path('/authenticateduser/')
        client.get(url, options) do |response|
          if response.code == 200
            a_hash = parse response
            Resource::User.from_coach a_hash
          else
            false
          end
        end
      rescue
        raise 'Error: Could not authenticate user!'
      end
    end
def authenticate(username, password)
      begin
        options = {authorization: basic_auth_encryption(username, password)}
        url = url_for_path('/authenticateduser/')
        client.get(url, options) do |response|
          if response.code == 200
            a_hash = parse response
            Resource::User.from_coach a_hash
          else
            false
          end
        end
      rescue
        raise 'Error: Could not authenticate user!'
      end
    end
Creates a Coach client for the cyber coach webservcie.

 @param [Client] client
 @param [ResponseParser] response_parser
 @param [Boolean] debug
 @return [Coach]

 Authenticates a user against the Cyber Coach Webservice.

 @param username
 @param password
 @return [User]

 ====Example
 @example
   @coach.authenticate('arueedlinger', 'test')