added hash function to login