You should encode string username:password.