Clean up some server util funcs, fix 'Remember me'