refactored login button code; added event engine login button