implemented sending user's password to server via JSON