added logout and user type check