I'd suggest you read about React State, some things in this piece of code are wrong. But let's fix your problem.

First add this variable to the state and then change it with setState, to trigger a rerender:

export class LoginPage extends React.Component{
    constructor(props) {
      super(props);
      this.state = {
        loading: false
      };
    }

    login(){
      this.setState({ loading: true })
      console.log(this.state.loading)
    }

    render(){
      let username = '',
          password = '',

      // your return will stay the same
    }
}