added restricted access decorator and logout view