login implemented and a lot of improvements