Simple user registration and authentication middleware and routes for restrap