Fix password check in handle_connection