Authorization tests completion and refactor