pulled code that didnt need to be in the user choose/login area.  udpated code to reduce php errors