rest of front end logic except session handling, working