added functionality with database to manage accounts