I am making a user signup app for an ecomerce site, but I have run into a very odd problem. When I run this code:
I would suggest commenting out all of your cflocations temporarily and seeing if your behaviour is the same. It could be that your login process doesn't finish before your cflocation starts.
Or, it could be that your page submits to itself correctly the first time, and then the second time hits the else clause.
There is nothing in your code that is obviously wrong to me.