Fix authenticate, add schema