Added /api/auth functionality