Finished login system with sessions