Oops - throw the right error code when not logged in