Restored getPreferences, added realname and location to user pages
Tidied up user routes a bit
Better generic handling of API error statuses, used unauthorised message get as a test case
Error page improvements