some bug remains to be fixed

1.  error: cannot send headers after they are sent(what the hell does
this is mean！）
2.  flash message on the register page
3. seperate the router rules from app.js to router.js