Use error class in registration and similar things

/me sends it in the hope it works...



Don't tell anyone, but I didn't test it (my eyes are hurting a bit these days), please review it and/or do some tests if you can...