Added password authentication and encryption