Move GitHub login view logic to JS

Closes #48