Improve middleware permission code
Correction middleware
Improve Previous tests
add get user test of middleware permission
add utility file to tests
Add middleware permission into server