Improved login modal, added comments to code