login functionality finalized