changed database class, added session class, implemented simple login