Fix bug in current user logic
Make db connection configurable