You have following errors here:
Here you use "$home" at the start. If you want your home folder use "$HOME" (watch capital letters) and if normal path - use "/home/myname". "$HOME" is preferred.
Same here, by the way, are you sure you have executable files in "lib" directory, I suppose there are only library files, and as I known PATH is not searched for libraries during compilation.
Here you should remove first and last "$" sign (I suppose you have no defined variable $usr anywhere), and once again, do you have this directory gcc, as in my system this is a file, and in PATH variable you specify directories to search - not files.
".profile" 25 lines, 802 characters
This line should not be in this file.
So the correct file should look that, but consider removing two last lines before "fi", as I noted ealier they are probably unnecessary:
#set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
Also please use CODE tags around your code, beacause it is more readable than and we can see real file not parsed by forum. Also if you still can not login, look again in ".xsession-errors" and show contents - there will be another errors.