allow login with token
fix github test
cover new github functions
tests for corner cases