Added the redirecting code. The user is properly redirected depending on his/her privilege value.