start of login modal, refactoring how modal works