Improvements

BBCode detection, correct redirect destination on error, fixed overflow of username in chat.