Fix authorized handler - closes #44