Update router.js

- Removed unnecessary new lines
- Removed unnecessary console log
- Fixed indenting
- Code looks good and structured, easy to understand.