add auth middleware
add auth to frontend