api/logout, add shortcut methods for rendering errors and server errors