diff --git a/webapp/components/login/login_controller.jsx b/webapp/components/login/login_controller.jsx
index c1b7f8a747..dc450dabdd 100644
--- a/webapp/components/login/login_controller.jsx
+++ b/webapp/components/login/login_controller.jsx
@@ -52,8 +52,47 @@ export default class LoginController extends React.Component {
preSubmit(e) {
e.preventDefault();
- const loginId = this.state.loginId.trim();
- const password = this.state.password;
+ // password managers don't always call onInput handlers for form fields so it's possible
+ // for the state to get out of sync with what the user sees in the browser
+ let loginId = this.refs.loginId.value;
+ if (loginId !== this.state.loginId) {
+ this.setState({loginId});
+ }
+
+ let password = this.refs.password.value;
+ if (password !== this.state.password) {
+ this.setState({password});
+ }
+
+ loginId = loginId.trim();
+ password = password.trim();
+
+ if (!loginId) {
+ this.setState({
+ serverError: (
+