What is rewriting my user related URLs? My main username is 'bw_admin'. If I visit my login page at localhost:8888/mysite/?q=user I would be able to login but after my login I can't view the account page. Instead I get a HTTP500 internal server error. What I notice it that the underscore of my username is being deleted automatically so I would be getting localhost:8888/mysite/?q=user/bwadmin instead of localhost:8888/mysite/?q=user/bw_admin.

after getting the error if I would just edit the bad URL into the URL of the mainpage of the site I can go on while logged in as admin. But it's important for future user to not have this problem so they won't panic

Here's a list of the modules that I've installed in case this might be a typical problem related to a certain module.

addthis
addtoany
admin_menu
advanced_help
auto_nodetitle
autoload
cck
content_profile
context
ctools
devel
devel_themer
fckeditor
filefield
google_analytics
image
imageapi
imagecache
imagefield
imce
imce_wysiwyg
insert
jquery_ui
jquery_ui_dialog
jquery_update
lightbox2
menu_breadcrumb
module_filter
nice_menus
oauth
panels
pathauto
token
twitter
views
webform
wysiwyg
wysiwyg_imageupload
The module that creates a URL like localhost:8888/mysite/?q=user/bwadmin (or localhost:8888/mysite/user/bwadmin, with clean URLs enabled) is the Pathauto module, which creates path alias for user, node, and taxonomy term URLs.

Check the module settings; there is a set of options that allows replacing some specific characters that would cause some problems; one of those characters is the underscore. In your case, the module is set to strip off underscores from the path alias it generates.