Fixed authorize workflow