finished binding and cookies

also fixed some login bugs with url / ajax