Implement direct login flag

This PR implements a flag to directly login to a db.