Added logic to user dao implementation