add login function, but database is not set