Fixed form resubmission issues in homepage.

Solves Issue 19 for the homepage. The functions of GET and POST are
separated(in app.py) resulting in only GET request on pressing the back
button or refreshing the homepage. The same needs to be done to all the
POST requests.