smarter login box with sweet alert