def log_in
      return true if logged_in?
      fill_out_login_form
      submit(login_form, login_form.buttons.first)

      if back_on_login_page?
        raise FailedLogin, "Login failed. Please verify username & password"
      end
      @logged_in = true
    rescue Mechanize::ResponseCodeError
      raise InvalidPage, "'#{@base_uri}' is returning a 404. Please verify the URL is a functioning Redmine installation"
    end
def log_in
      return true if logged_in?
      fill_out_login_form
      submit(login_form, login_form.buttons.first)

      if back_on_login_page?
        raise FailedLogin, "Login failed. Please verify username & password"
      end
      @logged_in = true
    rescue Mechanize::ResponseCodeError
      raise InvalidPage, "'#{@base_uri}' is returning a 404. Please verify the URL is a functioning Redmine installation"
    end
Public: Logs into the Redmine site using credentials specified on object
         instantiation.

 Returns true if login process was successful.
 Raises FailedLogin if the login was not successful.
 Raises InvalidPage if the specified site returns a 404 response code.