Added hash function for validated login