How laoding post page and get page in current window?

I have page login. Users enter their data and submit they. I want loading get page and post for user. Example:

Hi, not sure what you looking for…

You want an example of a loading spinner to show the user they are logging in or you want example of how to take the user data and then log them in?