Password handling refactored and added support for OATH