login logic added.
log-out logic added.