making function work for log in and aditional debits and credits