adds login/logout and misc functions