Pluggable authentication mechanisms.

Hello,

I am writing a server that will use a custom  challenge-response auth scheme, so I was in need of a way to plug my auth code in. This changeset replaces Credentials in the Config with a more generic AuthMethods. 

Your call if the extra flexibility is worth the extra complexity though.