added login and started using sessions