make security login
some modification and augment