Remove a lot of unnecessary imports and whitespace, and fix a bug that would've caused issues when a user tried to authorize an application for which they lacked permission.

Signed-off-by: Tyler O'Meara <Tyler@TylerOMeara.com>