PasswordFlow support

Added support for the password flow.