login, login error handler, preferences work