Added documentation
Added original url encoding on client. Added redirection to main page after succeed authorization.