added session handling; added url redirect