Use phantomjs for login and bug fix for accented characters