login db functionality
merging