Fix error meesgae formatting and write tests for user page and errors