Fixed authentication bugs; Remove unuseful files