prepare loggedin hooks