Fixed buggy issues update upon login
Refactored code
Closed bufferedReader which was previously missed out (reverted from commit a906554f512f174488ffe41be026ee7355163a43)