Converted to using openssl for crypt. Added type checks to password compare to fix empty password compare failing