log in from database
log in user on registration