coded ability for registered users to login and logout