Added login/logout including protection