getting closer, few more login protocol related bugs