Sorted out url routing and added some authentication stuff.