First crack at getting remember me cookies working
More tidying up. Won't test new login code til tomorrow morning