add more python/flask code for login and index functionality

also some basic template changes