fixes wieird login map state

also refactors how map states work.