add register feature for flaskr