added salt and method to hash password with
added declaration of vars
replaced sha1 by hash
declared method loginCheck
replaced password var name by hash for user hash