added username existence check