Reduced duplicate code in Lobby and Player model for password hashing.