added base login logic functionality