Fix authenticate_user