Add logged in/out behaviour