removed unsafe api calls
added password hashing