Bug Fix

1. Fix the bug that could cause user to login multiple times