Fix redirectings and error messages, small changes to layout