added check to see if user has admin rights when accessing admin page