lots of changes inc. fixing auth