     
     try request.auth.login(credentials, persist: true)
     
-    throw Abort.custom(status: .ok, message: "Login successful!")
+    return JSON(["message": "Login successful!"])
 }
 
 drop.get("logout") { request in

    
    try request.auth.logout()
    
    throw Abort.custom(status: .ok, message: "Logout successful!")
}

drop.post("register") { request in

    
    _ = try User.register(credentials: credentials)
    
    return JSON(["message": "Registration successful!"])
}

drop.run()
