Refactoring webtest

see #227
showing general error if login fails

see #227