<h1>Login</h1>

<form name="form">
    <label>Email:
        <input type="text" name="email" ng-model="loginForm.email" required server-error>
    </label>

    <div class="errors" ng-show="form.email.$dirty && form.email.$invalid">
        <span class="error" ng-show="form.email.$error.required">Email is required.</span>
        <span ng-show="form.email.$error.server">{{ errors.email }}</span>
    </div>

    <label>Password:
        <input type="password" name="password" ng-model="loginForm.password" required server-error>
    </label>


    <div class="errors" ng-show="form.password.$dirty && form.password.$invalid">
        <span class="error" ng-show="form.password.$error.required">Password is required.</span>
        <span ng-show="form.password.$error.server">{{ errors.password }}</span>
    </div>

    <button type="submit" class="button" ng-click="login()">Login</button>
</form>

<h1>Login</h1>

<form name="form" ng-submit="login()">
    <label>Email:
        <input type="text" name="email" ng-model="loginForm.email" required server-error>
    </label>

    <div class="errors" ng-show="form.email.$dirty && form.email.$invalid">
        <span class="error" ng-show="form.email.$error.required">Email is required.</span>
        <span ng-show="form.email.$error.server">{{ errors.email }}</span>
    </div>

    <label>Password:
        <input type="password" name="password" ng-model="loginForm.password" required server-error>
    </label>


    <div class="errors" ng-show="form.password.$dirty && form.password.$invalid">
        <span class="error" ng-show="form.password.$error.required">Password is required.</span>
        <span ng-show="form.password.$error.server">{{ errors.password }}</span>
    </div>

    <button type="submit" class="button">Login</button>
</form>

Use ng-submit rather than ng-click on button
Use ng-submit rather than ng-click on button

This way when the user enters their data and presses enter the login
function is called.
