Password auth

Added support for password and key authentication, solving #1 and #2