fixed some bugs related to login, links not opening in external browser, implemented #56.