• Parameters

    • e: SyntheticEvent<Element, Event>
    • email: string
    • password: string

      login user

      after sucessful login does the following:

      if path is "/login" -> the user is routed to "/"

      if path is something elselike post page -> then user is kept on the same page for ease

    Returns Promise<undefined | {
        error: any;
    }>