Added a template
Handling get and post
redirect from index to login